package com.budwk.app.util.poiUtils.fireHiddenOffice.impl;

import cn.hutool.core.bean.BeanUtil;
import com.budwk.app.sqfw.dto.FireHiddenCheckWordDTO;
import com.budwk.app.sqfw.dto.FireHiddenOfficeWordDTO;
import com.budwk.app.sqfw.dto.YuHongMenStreetFireHiddenCheckWordDTO;
import com.budwk.app.sqfw.vo.GenerateWordAndPdfUrlVO;
import com.budwk.app.util.poiUtils.YuHongMenStreetFireHiddenOfficeUtils;
import com.budwk.app.util.poiUtils.fireHiddenOffice.IFireHiddenOffice;

/**
 * @author XYD-PC021
 * @project wk-mini
 * @description 宇虹
 * @date 2023/11/29 16:18:17
 */
public class YuHongFireHiddenOffice implements IFireHiddenOffice {

    @Override
    public GenerateWordAndPdfUrlVO createOffice(FireHiddenCheckWordDTO wordDTO) {
        YuHongMenStreetFireHiddenCheckWordDTO yuHongWordDTO = new YuHongMenStreetFireHiddenCheckWordDTO();
        BeanUtil.copyProperties(wordDTO, yuHongWordDTO);
        GenerateWordAndPdfUrlVO resultVO = YuHongMenStreetFireHiddenOfficeUtils.createFireHiddenPDF(yuHongWordDTO);
        //设置电话号码
        resultVO.setPhone(yuHongWordDTO.getA4());
        return resultVO;
    }

    @Override
    public void createSplitPdf(FireHiddenOfficeWordDTO wordDTO) {

    }

    @Override
    public String createWordTemplate(FireHiddenOfficeWordDTO wordDTO) {
        YuHongMenStreetFireHiddenCheckWordDTO yuHongWordDTO = new YuHongMenStreetFireHiddenCheckWordDTO();
        BeanUtil.copyProperties(wordDTO, yuHongWordDTO);
        GenerateWordAndPdfUrlVO resultVO = YuHongMenStreetFireHiddenOfficeUtils.downTemplate(yuHongWordDTO);
        return resultVO.getWordUrl();
    }
}
